package com.springboot.study.service;

import net.sf.cglib.proxy.Enhancer;

/**
 * @Author: guodong
 * @Date: 2021/9/16 13:18
 * @Version: 1.0
 * @Description:
 */
public class SpringRetryProxy {

    public Object newProxyInstance(Object target){
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(target.getClass());
        enhancer.setCallback(new AnnotationAwareRetryOperationsInterceptor());
        return enhancer.create();
    }


}
